Xceed DataGrid for Silverlight Documentation
AlternatingGroupLevelGroupConfigurationSelector Class

Imports System
Imports System.Net
Imports System.Windows
Imports Xceed.Silverlight.DataGrid
 
Namespace Xceed.Silverlight.Documentation

  Public Class AlternatingGroupLevelConfigurationSelector 
                     Inherits DataGridGroupConfigurationSelector
  
    Public Property EvenGroupConfiguration As DataGridGroupConfiguration 
      Get
      End Get
      Set
      End Set
    End Property
 
    Public Property OddGroupConfiguration As DataGridGroupConfiguration     
      Get
      End Get
      Set
      End Set
    End Property
 
    Public Overrides Function Select( ByVal level As Integer, ByVal dataItem As Object ) As DataGridGroupConfiguration     
      If ( level Mod 2 ) = 0 Then
        Return Me.EvenGroupConfiguration
 
      Return Me.OddGroupConfiguration
    End Function
  End Class
End Namespace
using System;
using System.Net;
using System.Windows;
using Xceed.Silverlight.DataGrid;
 
namespace Xceed.Silverlight.Documentation
{
  public class AlternatingGroupLevelConfigurationSelector : DataGridGroupConfigurationSelector
  {
    public DataGridGroupConfiguration EvenGroupConfiguration
    {
      get;
      set;
    }
 
    public DataGridGroupConfiguration OddGroupConfiguration
    {
      get;
      set;
    }
 
    public override DataGridGroupConfiguration Select( int level, object dataItem )
    {
      if( ( level % 2 ) == 0 )
        return this.EvenGroupConfiguration;
 
      return this.OddGroupConfiguration;
    }
  }
}
Send Feedback